import { EventEmitter } from '@stencil/core';

// export interface OverlayEventDetail<T = any> {
//   data?: T;
//   role?: string;
// }

export interface OverlayInterface {
  el: HTMLElement;
  keyboardClose: boolean;
  overlayIndex: number;
  presented: boolean;

  didDismiss: EventEmitter<any>;

  /**
   * 打开
   *
   * @description 注解：Method
   * @author chitanda
   * @date 2021-04-05 14:04:24
   * @return {*}  {Promise<void>}
   */
  present(): Promise<void>;

  /**
   * 关闭
   *
   * @description 注解：Method
   * @author chitanda
   * @date 2021-04-05 18:04:41
   * @param {*} data
   * @return {*}  {Promise<void>}
   */
  dismiss(data?: any): Promise<boolean>;

  /**
   * 窗口关闭事件
   *
   * @description 注解：Method
   * @author chitanda
   * @date 2021-04-05 18:04:33
   * @return {*}  {Promise<any>}
   */
  onDidDismiss(): Promise<any>;
}
